package com.bkhc.product.entity;

import com.bkhc.common.annotation.Uid;
import com.bkhc.common.enu.BrandStatusEnum;
import com.bkhc.common.listener.DataEntityListener;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@Entity
@Data
@Table(name = "tbl_brand_product")
@EntityListeners({AuditingEntityListener.class, DataEntityListener.class})
public class BrandProduct {
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Id
    private int id ;

    @Column(name = "brand_code")
    private String brandCode;
    @Column(name = "brand_name")
    private String brandName;
    @Column(name = "product_code")
    private String productCode;
    @Column(name = "product_name")
    private String productName;
    @Column(name = "creator",updatable = false)
    private String creator;

    @Column(name = "create_date",updatable = false)
    @CreatedDate
    private Date createDate;

    @Column(name = "updator")
    private String updator;

    @LastModifiedDate
    @Column(name = "update_date")
    private Date updateDate;

}
